package com.cbh.amadeus.common.protocol;

import com.cbh.amadeus.common.utils.StringPool;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @author ChenBiHui
 * @date 2025/4/25
 */
@Data
@Accessors(chain = true)
public class AmadeusMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 消息发布者
     */
    private String provider;

    /**
     * 主题
     */
    private String topic;

    /**
     * 消息ID
     */
    private String messageId;

    /**
     * 消息内容
     */
    private String payload;

    public String unique() {
        return this.topic + StringPool.COMMA + this.messageId;
    }
}